package step

import _interface "adam2/internal/quant/interface"

// 更新quant_account步骤
type UpdateQuantAccountBeforeSellStep struct {
	updateQuantAccountBeforeSell *_interface.UpdateQuantAccount
	sellDate                     *_interface.SellDate
}

// 初始化
func (u *UpdateQuantAccountBeforeSellStep) Init(updateQuantAccountBeforeSell *_interface.UpdateQuantAccount, sellDate *_interface.SellDate) {
	u.updateQuantAccountBeforeSell = updateQuantAccountBeforeSell
	u.sellDate = sellDate
}

// 在卖出之前更新quant_account
func (u *UpdateQuantAccountBeforeSellStep) UpdateQuantAccountBeforeSellStep(transactionDate string) {
	(*u.updateQuantAccountBeforeSell).Exec(transactionDate)
}
